//卡劵管理-卡劵列表-配置文件
App.util.ns('Admin.Card.Card');
Admin.Card.Card.Conf = {
    columns: [
        {name: '名称', value: 'name'},
        {name: '价格', width: '80px', value: 'fee'},
        {name: '类型', width: '80px', value: function(item){
            switch (item.type+'') {
                case '1':
                    return '系统充值';
                case '2':
                    return '卡劵充值';
            }
        }},
        {name: '创建日期', width: '80px', value: function(item){
            return App.util.formator.date(item.created_at);
        }}
    ],
    form: [
        {type: 'hidden', name: 'id'},
        {type: 'input', name: 'name', title: '名称', rule: {
            type: 'str',
            range: [0, 50]
        }},
        {type: 'input', name: 'fee', title: '价格', rule: {
            type: 'str',
            range: [0, 50]
        }},
        {type: 'radio', name: 'type', title: '类型',
            items: [
                ['1', '系统充值'],
                ['2', '卡劵充值']
            ],
            defaults: '1'
        }
    ]
};